//package com.example.fresh_fruit.controller;
//
//import com.example.fresh_fruit.permission.Permission;
//import com.example.fresh_fruit.service.BusinessPersionService;
//import com.example.fresh_fruit.util.Result;
//import com.example.fresh_fruit.util.TokenUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * @author :飞天の鱼
// * @date : 2022/8/22 9:42
// */
//@Slf4j
//@RestController
//@RequestMapping("/BusinessPersion")
//public class BusinessPersionController {
//    @Autowired
//    private HttpServletRequest request;
//    @Autowired
//    private BusinessPersionService businessPersionService;
//
//    @GetMapping("/findId")
//    @Permission(100)
//    private Result findById(Integer id) {
//
//        String token = request.getHeader("token");
//        Integer persionId = TokenUtil.getAudience(token);
//
//        boolean result = businessPersionService.find(persionId, id);
//        if (!result) {
//            return Result.fail().message("权限不够");
//        }
//        return Result.ok().message("");
//    }
//}
